<%@ include file="/taglibs.jsp"%>

<head>
    <title><fmt:message key="userSearchForm.title"/></title>
</head>
<s:form name="userSearchForm" action="search_user" method="post">

	<s:textfield key="user.username" size="20"/>  
    <s:textfield maxlength="30" key="user.firstName" size="20"/>
    <s:textfield maxlength="30" key="user.lastName"  size="20"/>
    <s:select key="user.department" name="departmentId" list="departments" listKey="id" listValue="name" headerKey="%{getText('select.default.key')}" headerValue="%{getText('select.default.value')}"></s:select>
    <s:select key="user.position" name="positionId" list="positions" listKey="id" listValue="name" headerKey="%{getText('select.default.key')}" headerValue="%{getText('select.default.value')}"></s:select>
<tr>
    <td colspan="2">
	    <button type="submit" class="button" name="search" onclick="this.blur()">
			<fmt:message key="button.search.title"></fmt:message>
			<img src="${ctx}/images/btn_search.png" align="left" height="20" width="20">
		</button>
	    <button type="reset" class="button" name="reset" onclick="this.blur()">
			<fmt:message key="button.reset.title"></fmt:message>
			<img src="${ctx}/images/btn_undo.png" align="left" height="20" width="20">
		</button>
	    <button type="submit" class="button" name="cancel" onclick="form.onsubmit=null"">
			<fmt:message key="button.cancel.title"></fmt:message>
			<img src="${ctx}/images/btn_cancel.png" align="left" height="20" width="20">
		</button>
    </td>
</tr>

<br/>
<display:table name="users" class="table" requestURI="" id="userList"  pagesize="10">
    <display:column property="username" href="editUser.html" media="html"
        paramId="id" paramProperty="id" sortable="true" titleKey="user.username" escapeXml="true"/>
    <display:column sortable="true" titleKey="user.fullname">
    	${userList.firstName} ${userList.lastName}   
    </display:column>
    <display:column sortable="true" titleKey="user.department" property="department.name"/>
    <display:column sortable="true" titleKey="user.position" property="position.name"/>
</display:table>

<script type="text/javascript">highlightTableRows("userList");</script>
</s:form>
